import request from '@/utils/request'

// 查询轮播图列表
export function listAdv(query) {
  return request({
    url: '/system/adv/list',
    method: 'get',
    params: query
  })
}

// 查询轮播图详细
export function getAdv(id) {
  return request({
    url: '/system/adv/' + id,
    method: 'get'
  })
}

// 新增轮播图
export function addAdv(data) {
  return request({
    url: '/system/adv',
    method: 'post',
    data: data
  })
}

// 修改轮播图
export function updateAdv(data) {
  return request({
    url: '/system/adv',
    method: 'put',
    data: data
  })
}

// 删除轮播图
export function delAdv(id) {
  return request({
    url: '/system/adv/' + id,
    method: 'delete'
  })
}

// 导出轮播图
export function exportAdv(query) {
  return request({
    url: '/system/adv/export',
    method: 'get',
    params: query
  })
}